<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <ul>
      <li>文理东</li>
      <li>李盼</li>
      <li>潘万丽</li>
    </ul>
    <script>
      var arr = ['老虎', '猴子', '猫']

      //  循环数组
      arr.forEach(function (item, index) {
        // item:循环数组的每项 index:所在数组的下标
        console.log(index, ':', item)
      })
      //   console.log(result)

      // 获取li标签
      var lisEle = document.querySelectorAll('ul li')
      lisEle.forEach(function (liNode, index) {
        console.log(index, ':', liNode.innerText)
      })
    </script>
  </body>
</html>
